﻿using HDS.Model;
using HDS.Model.Entity.Sys;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace HDS.IService.Sys
{
    public interface ISysUserService
    {
        Task Disable(int userId);
        Task Enable(int userId);
        Task<SysUser> Get(int userId);
        Task<SysUser> Get(int userId, string userPwd);
        Task<SysUser> Get(string userEmail, string userPwd);
        Task<List<SysFun>> GetFuns(int userId);
        Task<DataPagingModel<SysUser>> GetList(Expression<Func<SysUser, bool>> whereExpression, int pageIndex = 1, int pageSize = 20);
        Task<List<SysRole>> GetRoles(int userId);
        Task<ResultData<SysUser>> Register(SysUser user);
        Task SetRoles(int userId, int[] roleIds);
        Task Update(SysUser user);
        Task UpdatePwd(int userId, string userPwd);
        Task<bool> HasFun(int userId, string url);
    }
}